# Copyright (c) 2019 Presto Labs Pte. Ltd.
# Author: xguo

from coin.exchange.coinone_v2.rest.subscriber import CoinoneSubscriber as CoinoneRestSubscriber
from coin.exchange.coinone_v2.ws.subscriber import CoinoneMultiSubscriberWrapper
from coin.strategy.mm.feed_builder import CoinoneRestFlowBookBuilder
from coin.strategy.mm.feed_builder import CoinoneWsFlowBookBuilder

from coin.strategy.mm.base.feed import BaseFeedSubsystem
from coin.strategy.mm.subscription import SubscriptionRequest


class CoinoneRestFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Coinone', None)
  FeedSubscriber = CoinoneRestSubscriber
  FlowBookBuilder = CoinoneRestFlowBookBuilder


class CoinoneWsFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Coinone', None)
  FeedSubscriber = CoinoneMultiSubscriberWrapper
  FlowBookBuilder = CoinoneWsFlowBookBuilder

  def _init_subscriber(self):
    return super()._init_subscriber(subscriber_group_id='TBD')
